package com.bosicloud.cmb.ibp.microplatform.commom.vo;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateMicroPlatformVO {

    @NotNull
    @NotBlank(message = "regionName不能为空")
    String regionName;
    @NotNull
    @NotBlank(message = "envName不能为空")
    String envName;
    @NotNull
    @NotBlank(message = "accessKey不能为空")
    String accessKey;
    @NotNull
    @NotBlank(message = "secretKey不能为空")
    String secretKey;
    @NotNull
    @NotBlank(message = "keyParis不能为空")
    String keyParis;
    @NotNull
    @NotBlank(message = "vpcId不能为空")
    String vpcId;
    String publicSubNetwork;
    @NotNull
    @NotBlank(message = "privateSubNetwork不能为空")
    String privateSubNetwork;
    String publicNetworkSafetyGroupId;
    @NotNull
    @NotBlank(message = "ecs安全组网不能为空")
    String ecsSafetyGroupId;
    @NotNull
    @NotBlank(message = "LB安全组网不能为空")
    String lbSafetyGroupId;
    @Pattern(regexp = "^[a-zA-z][A-Za-z0-9-]{0,9}", message = "集群名称必须以字母开头只能包含数字和-")
    @Length(max = 10, message = "集群名称最大长度为10")
    @NotBlank(message = "clusterName不能为空")
    String clusterName;
    @NotNull
    @NotBlank(message = "ec2Type不能为空")
    String ec2Type;
    @NotNull
    @Min(value = 0, message = "请选择EC2数量")
    Integer ec2Count;
    @NotNull
    @NotBlank(message = "gitUrl不能为空")
    String gitUrl;
    String gitAccount = "";
    String gitPassword = "";
    @NotNull
    @NotBlank(message = "token不能为空")
    String token;
    @NotNull
    @NotBlank(message = "ecsRole不能为空")
    String ecsRole;
    @NotNull
    @NotBlank(message = "ec2Role不能为空")
    String ec2Role;
    Integer createUser;


}
